﻿using RPG01.Scripts.SateMachine;

namespace RPG01.Scripts.Character.Player;

public class PlayerState : State
{
	private float jumpVelocity;
	private float jumpGravity;
	private float fallGravity;
	
	protected PlayerState(Player player, StateMachine stateMachine) : base(player, stateMachine)
	{
		
	}

	public void Initialize(float jumpHeight, float jumpTimeToPeak, float JumpTimeToDescent)
	{
		jumpVelocity = ((jumpHeight * 2.0f) / jumpTimeToPeak) * -1.0f;
		jumpGravity = (jumpHeight * -2.0f) / (jumpTimeToPeak * jumpTimeToPeak) * -1.0f;
		fallGravity = jumpHeight * -2.0f / (JumpTimeToDescent * JumpTimeToDescent) * -1.0f;
		// https://youtu.be/IOe1aGY6hXA?feature=shared
	}
	
	public override void PhysicsProcess(double delta)
	{
		base.PhysicsProcess(delta);
		
		
	}
}